package com.jintian.hnsj_metting.util

import java.text.SimpleDateFormat
import java.util.Date

class TimeUtil {


    companion object {
        fun formatMD(date: Date?): String {
            if (date == null) {
                return ""
            }
            return try {
                SimpleDateFormat("MM-dd").format(date)
            } catch (e: Exception) {
                ""
            }
        }

        fun formatHM(date: Date?): String {
            if (date == null) {
                return ""
            }
            return try {
                SimpleDateFormat("HH:mm").format(date)
            } catch (e: Exception) {
                ""
            }
        }
    }
}